//
//  RYCToolBar.h
//  TestTool
//
//  Created by zhiwei ma on 12-8-22.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

@class RYCToolBar;
@protocol RYCToolBarDelegate <NSObject>
@optional
- (void)didItemSelected:(RYCToolBar*)aToolbar selectedIndex:(NSInteger)aIndex;
@end

@interface RYCToolBar : UIView

@property (nonatomic, assign) id<RYCToolBarDelegate> toolbardelegate;
@property (nonatomic, readonly, retain) UIScrollView* scrollView;
@property (nonatomic, copy) NSArray* items;//UIButtons
@property (nonatomic, readonly) NSInteger selectedIndex;
@property (nonatomic, retain) UIImageView* bgImageView;
@property (nonatomic, retain) UIImage* itemBackgroundImage;
@property (nonatomic, retain) UIColor* itemBackgroundColor;

@property (nonatomic) CGFloat itemAlign;
@property (nonatomic) CGFloat itemGap;

- (void)setSelectedIndex:(NSInteger)selectedIndex animated:(BOOL)animated;
- (void)setBgItemImageViewContentMode:(UIViewContentMode)contentMode;
@end

@interface UIButton (RYCToolbar)
+ (UIButton*)buttonWithTitle:(NSString*)aTitle;
@end